home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / Timer.p < prev    next >
Text File  |  1996-05-01  |  2KB  |  113 lines

  1. {
  2.      File:        Timer.p
  3.  
  4.      Contains:    Time Manager interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT Timer;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __TIMER__}
  28. {$SETC __TIMER__ := 1}
  29.  
  30. {$I+}
  31. {$SETC TimerIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __CONDITIONALMACROS__}
  35. {$I ConditionalMacros.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __TYPES__}
  38. {$I Types.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __OSUTILS__}
  41. {$I OSUtils.p}
  42. {$ENDC}
  43.  
  44. {$PUSH}
  45. {$ALIGN MAC68K}
  46. {$LibExport+}
  47.  
  48. {$IFC FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED }
  49.  
  50. CONST
  51.                                                                 {  high bit of qType is set if task is active  }
  52.     kTMTaskActive                = $00008000;
  53.  
  54.  
  55. TYPE
  56.     TimerProcPtr = Register68kProcPtr;  { PROCEDURE Timer(tmTaskPtr: TMTaskPtr); }
  57.  
  58.     TimerUPP = UniversalProcPtr;
  59.     TMTaskPtr = ^TMTask;
  60.     TMTask = RECORD
  61.         qLink:                    QElemPtr;
  62.         qType:                    INTEGER;
  63.         tmAddr:                    TimerUPP;
  64.         tmCount:                LONGINT;
  65.         tmWakeUp:                LONGINT;
  66.         tmReserved:                LONGINT;
  67.     END;
  68.  
  69. PROCEDURE InsTime(tmTaskPtr: QElemPtr);
  70.     {$IFC NOT GENERATINGCFM}
  71.     INLINE $205F, $A058;
  72.     {$ENDC}
  73. PROCEDURE InsXTime(tmTaskPtr: QElemPtr);
  74.     {$IFC NOT GENERATINGCFM}
  75.     INLINE $205F, $A458;
  76.     {$ENDC}
  77. PROCEDURE PrimeTime(tmTaskPtr: QElemPtr; count: LONGINT);
  78.     {$IFC NOT GENERATINGCFM}
  79.     INLINE $201F, $205F, $A05A;
  80.     {$ENDC}
  81. PROCEDURE RmvTime(tmTaskPtr: QElemPtr);
  82.     {$IFC NOT GENERATINGCFM}
  83.     INLINE $205F, $A059;
  84.     {$ENDC}
  85. PROCEDURE Microseconds(VAR microTickCount: UnsignedWide);
  86.     {$IFC NOT GENERATINGCFM}
  87.     INLINE $A193, $225F, $22C8, $2280;
  88.     {$ENDC}
  89.  
  90. CONST
  91.     uppTimerProcInfo = $0000A002;
  92.  
  93. FUNCTION NewTimerProc(userRoutine: TimerProcPtr): TimerUPP;
  94.     {$IFC NOT GENERATINGCFM }
  95.     INLINE $2E9F;
  96.     {$ENDC}
  97.  
  98. PROCEDURE CallTimerProc(tmTaskPtr: TMTaskPtr; userRoutine: TimerUPP);
  99.     {$IFC NOT GENERATINGCFM}
  100.     {To be implemented:  Glue to move parameters into registers.}
  101.     {$ENDC}
  102. {$ENDC}
  103. {$ALIGN RESET}
  104. {$POP}
  105.  
  106. {$SETC UsingIncludes := TimerIncludes}
  107.  
  108. {$ENDC} {__TIMER__}
  109.  
  110. {$IFC NOT UsingIncludes}
  111.  END.
  112. {$ENDC}
  113.